Optimal. Leaf size=45 \[ \frac {1}{6} b c x^2+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{6} b c^3 \log \left (c^2-x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {6037, 269, 272,
45} \begin {gather*} \frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{6} b c^3 \log \left (c^2-x^2\right )+\frac {1}{6} b c x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 269
Rule 272
Rule 6037
Rubi steps
\begin {align*} \int x^2 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right ) \, dx &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{3} (b c) \int \frac {x}{1-\frac {c^2}{x^2}} \, dx\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{3} (b c) \int \frac {x^3}{-c^2+x^2} \, dx\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \frac {x}{-c^2+x} \, dx,x,x^2\right )\\ &=\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{6} (b c) \text {Subst}\left (\int \left (1-\frac {c^2}{c^2-x}\right ) \, dx,x,x^2\right )\\ &=\frac {1}{6} b c x^2+\frac {1}{3} x^3 \left (a+b \tanh ^{-1}\left (\frac {c}{x}\right )\right )+\frac {1}{6} b c^3 \log \left (c^2-x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 50, normalized size = 1.11 \begin {gather*} \frac {1}{6} b c x^2+\frac {a x^3}{3}+\frac {1}{3} b x^3 \tanh ^{-1}\left (\frac {c}{x}\right )+\frac {1}{6} b c^3 \log \left (-c^2+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 71, normalized size = 1.58
method | result | size |
derivativedivides | \(-c^{3} \left (-\frac {a \,x^{3}}{3 c^{3}}-\frac {b \,x^{3} \arctanh \left (\frac {c}{x}\right )}{3 c^{3}}-\frac {b \ln \left (1+\frac {c}{x}\right )}{6}-\frac {b \,x^{2}}{6 c^{2}}+\frac {b \ln \left (\frac {c}{x}\right )}{3}-\frac {b \ln \left (\frac {c}{x}-1\right )}{6}\right )\) | \(71\) |
default | \(-c^{3} \left (-\frac {a \,x^{3}}{3 c^{3}}-\frac {b \,x^{3} \arctanh \left (\frac {c}{x}\right )}{3 c^{3}}-\frac {b \ln \left (1+\frac {c}{x}\right )}{6}-\frac {b \,x^{2}}{6 c^{2}}+\frac {b \ln \left (\frac {c}{x}\right )}{3}-\frac {b \ln \left (\frac {c}{x}-1\right )}{6}\right )\) | \(71\) |
risch | \(\frac {x^{3} b \ln \left (x +c \right )}{6}-\frac {x^{3} b \ln \left (c -x \right )}{6}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{6}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{12}-\frac {i \pi b \,x^{3}}{6}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x +c \right )\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{3}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{3}}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (c -x \right )\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )}{12}+\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x +c \right )}{x}\right )^{2}}{12}-\frac {i \pi b \,x^{3} \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (c -x \right )}{x}\right )^{2}}{12}+\frac {x^{3} a}{3}+\frac {b c \,x^{2}}{6}+\frac {b \,c^{3} \ln \left (-c^{2}+x^{2}\right )}{6}\) | \(307\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.25, size = 42, normalized size = 0.93 \begin {gather*} \frac {1}{3} \, a x^{3} + \frac {1}{6} \, {\left (2 \, x^{3} \operatorname {artanh}\left (\frac {c}{x}\right ) + {\left (c^{2} \log \left (-c^{2} + x^{2}\right ) + x^{2}\right )} c\right )} b \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 49, normalized size = 1.09 \begin {gather*} \frac {1}{6} \, b c^{3} \log \left (-c^{2} + x^{2}\right ) + \frac {1}{6} \, b x^{3} \log \left (-\frac {c + x}{c - x}\right ) + \frac {1}{6} \, b c x^{2} + \frac {1}{3} \, a x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.15, size = 49, normalized size = 1.09 \begin {gather*} \frac {a x^{3}}{3} + \frac {b c^{3} \log {\left (- c + x \right )}}{3} + \frac {b c^{3} \operatorname {atanh}{\left (\frac {c}{x} \right )}}{3} + \frac {b c x^{2}}{6} + \frac {b x^{3} \operatorname {atanh}{\left (\frac {c}{x} \right )}}{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 227 vs.
\(2 (39) = 78\).
time = 0.44, size = 227, normalized size = 5.04 \begin {gather*} -\frac {b c^{4} \log \left (-\frac {c + x}{c - x} - 1\right ) - b c^{4} \log \left (-\frac {c + x}{c - x}\right ) + \frac {{\left (b c^{4} + \frac {3 \, b {\left (c + x\right )}^{2} c^{4}}{{\left (c - x\right )}^{2}}\right )} \log \left (-\frac {c + x}{c - x}\right )}{\frac {{\left (c + x\right )}^{3}}{{\left (c - x\right )}^{3}} + \frac {3 \, {\left (c + x\right )}^{2}}{{\left (c - x\right )}^{2}} + \frac {3 \, {\left (c + x\right )}}{c - x} + 1} + \frac {2 \, {\left (a c^{4} + \frac {3 \, a {\left (c + x\right )}^{2} c^{4}}{{\left (c - x\right )}^{2}} + \frac {b {\left (c + x\right )}^{2} c^{4}}{{\left (c - x\right )}^{2}} + \frac {b {\left (c + x\right )} c^{4}}{c - x}\right )}}{\frac {{\left (c + x\right )}^{3}}{{\left (c - x\right )}^{3}} + \frac {3 \, {\left (c + x\right )}^{2}}{{\left (c - x\right )}^{2}} + \frac {3 \, {\left (c + x\right )}}{c - x} + 1}}{3 \, c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.72, size = 42, normalized size = 0.93 \begin {gather*} \frac {a\,x^3}{3}+\frac {b\,c^3\,\ln \left (x^2-c^2\right )}{6}+\frac {b\,x^3\,\mathrm {atanh}\left (\frac {c}{x}\right )}{3}+\frac {b\,c\,x^2}{6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________